const request = require('request') // 请求
const util = require('util');

const getPromise = util.promisify(request.get);
const getSpider = (url, option) => {
	return new Promise((resolve, reject) => {
		getPromise(url, option = {
			encoding: null
		}).then((res) => {
			resolve(res)
		}).catch((err) => {
			reject(err)
		});
	})
}
module.exports = {
	getSpider
}
